﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"

    xmlns:local="using:JumpstartApp.Styles">

    <Color x:Key="PrimaryColor">Blue</Color>
    <SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" />
    <LinearGradientBrush x:Key="PageBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.845"/>
        <GradientStop Color="Black" Offset="1"/>
        <GradientStop Color="Black"/>
        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.736"/>
    </LinearGradientBrush>
    <DataTemplate x:Name="ChildTemplate">
        <Grid Background="White" Width="{Binding ColSpan}" Height="{Binding RowSpan}">
            <Image Source="{Binding Image}" Stretch="UniformToFill" />
            <Grid VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Margin="-5,0,30,30">
                <Grid.Background>
                    <SolidColorBrush Color="{StaticResource PrimaryColor}" Opacity=".75" />
                </Grid.Background>
                <Rectangle RenderTransformOrigin="0.5,0.5">
                    <Rectangle.Fill>
                        <SolidColorBrush Color="Black" Opacity=".25" />
                    </Rectangle.Fill>
                </Rectangle>
                <TextBlock Text="{Binding Title}" Margin="20" TextWrapping="Wrap" FontSize="16" MaxHeight="45" />
            </Grid>
        </Grid>
    </DataTemplate>
    <!-- used in semantic zoom -->
    <DataTemplate x:Name="ParentTemplate">
        <Grid Width="512" Height="288" Background="White" DataContext="{Binding Group}" d:DataContext="{Binding}">
            <Image Source="{Binding Children[0].Image}" Stretch="UniformToFill" />
            <Grid VerticalAlignment="Bottom" HorizontalAlignment="Stretch">
                <Grid.Background>
                    <SolidColorBrush Color="{StaticResource PrimaryColor}" Opacity=".75" />
                </Grid.Background>
                <Rectangle>
                    <Rectangle.Fill>
                        <SolidColorBrush Color="Black" Opacity=".5" />
                    </Rectangle.Fill>
                </Rectangle>
                <TextBlock Text="{Binding Title}" Margin="20" TextWrapping="Wrap" Style="{StaticResource TitleTextStyle}" />
            </Grid>
        </Grid>
    </DataTemplate>

</ResourceDictionary>
